//SPDX-FileCopyrightText: Copyright 2022-2024 深圳市同心圆网络有限公司
//SPDX-License-Identifier: GPL-3.0-only

package requirement_dao

import "go.mongodb.org/mongo-driver/mongo"

var RequirementInfoDao *_RequirementInfoDao
var LinkIssueInfoDao *_LinkIssueInfoDao
var KanoInfoDao *_KanoInfoDao
var FourQInfoDao *_FourQInfoDao
var RequirementRecycleDao *_RequirementRecycleDao

func InitDao(mgoDb *mongo.Database) (err error) {
	RequirementInfoDao, err = newRequirementInfoDao(mgoDb)
	if err != nil {
		return err
	}
	LinkIssueInfoDao, err = newLinkIssueInfoDao(mgoDb)
	if err != nil {
		return err
	}
	KanoInfoDao, err = newKanoInfoDao(mgoDb)
	if err != nil {
		return err
	}
	FourQInfoDao, err = newFourQInfoDao(mgoDb)
	if err != nil {
		return err
	}
	RequirementRecycleDao, err = newRequirementRecycleDao(mgoDb)
	if err != nil {
		return err
	}
	return nil
}
